ce07d5815cf97c83977436048a6726e77ead296a,modules/eerest/src/test/java/org/jpos/rest/APIAuthenticationTest.java,APIAuthenticationTest,testValidHash,#,71
Before Change
new APIAuthentication(
secretKey,
timestamp,
payLoad).hash(APIAuthentication.computeHash(secretKey, timestamp, payLoad)).validate();
} catch (IllegalArgumentException e) {
assertTrue ("Returned " + e.getMessage() + " instead of 'invalid.hash'", "invalid.hash".equals(e.getMessage()));
}
After Change
.version(APIAuthentication.VERSION)
.timestamp(cred.getTimestamp())
.nonce(cred.getNonce())
.hash(APIAuthentication.computeHash(cred, secretKey, payLoad)).build(), secretKey, payLoad);
} catch (IllegalArgumentException e) {
assertTrue ("Returned " + e.getMessage() + " instead of 'invalid.hash'", "invalid.hash".equals(e.getMessage()));
}